var gid;

function formateadorLink1(cellvalue, options, rowObject) {
  //return "<img class='item_img' src='"+cellvalue+"' />";
    return "<img src='"+cellvalue+"_60x60.jpg'></img>";
}

function formateadorLink2(cellvalue, options, rowObject) {
  var title = "<span style='text-decoration:underline;font-size:13px;color:blue;'>" + cellvalue + "</span>";
  return "<a href=http://item.taobao.com/item.htm?id=" + rowObject.IID + " target='_blank'>" + title + "</a>";
}

function setImageCellHeight(gridName) {
  var ids = $("#" + gridName).getDataIDs();
  for (var i = 0; i < ids.length; i++) {
    var cl = ids[i];
    $("#" + gridName).setRowData(cl, false, {height:50});
  }
}

function getTotalCount(obj){
  var totalCount = obj.getGridParam('records');
  if(totalCount === null || totalCount === ''){
    return 0;
    }
  return totalCount;
}

function reExecute(obj,batchId){
  obj.disabled = true;
  $.get("reExecute.action", "BATCH_ID="+batchId, afterReExecute);
}

function afterReExecute(){
  $("#"+gid).trigger("reloadGrid");
}
